/*
 * @Date: 2022-12-05 15:08:07
 * @Autor: lx
 * @LastEditors: lipengxi 2899952565@qq.com
 * @LastEditTime: 2022-12-09 14:05:50
 * @FilePath: /vdom-snabbdom/src/demo2.js
 */
import { init } from "snabbdom/build/package/init"
import { h } from "snabbdom/build/package/h"

const patch = init([])

let vnode = h("div#container", [
    h("h1", "hello lx"),
    h("p", "lsq")
])
const app = document.querySelector("#app")
let oldVnode = patch(app, vnode)
// 清空内容
setTimeout(() => {
    patch(oldVnode, h("!"))
}, 2000)
